﻿using System;
using System.Net.Mail;

namespace SimpleForum.Utils
{
    public static class Utils
    {
        public static void SendEmail(string To, string Subject, string Message)
        {
            MailMessage Email = new MailMessage();

            Email.DeliveryNotificationOptions = DeliveryNotificationOptions.Never;
            Email.BodyEncoding = System.Text.Encoding.UTF8;
            Email.IsBodyHtml = true;
            Email.From = new MailAddress("FIXME");
            Email.To.Add(To);
            Email.Subject = Subject;
            Email.Body = Message;

            SmtpClient Client = new SmtpClient("localhost");
            Client.Send(Email);
        }
    }
}